package com.example.service.impl;

import com.example.mapper.MessageMapper;
import com.example.model.MessageEntity;
import com.example.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service(value = "messageService")
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageMapper messageMapper;
    @Override
    public List<MessageEntity> getAllMessage() {
        return messageMapper.getAllMessage();
    }

    @Override
    public int insertMessage(MessageEntity msg) {
        return messageMapper.insertMessage(msg);
    }

    @Override
    public int deleteMessageById(int id) {
        return messageMapper.deleteMessageById(id);
    }

}
